package com.xv.yan.service.impl;

import com.xv.yan.beans.entity.StudentDo;
import com.xv.yan.beans.req.StudentRequest;
import com.xv.yan.beans.res.TableResult;
import com.xv.yan.beans.vo.StudentVo;
import com.xv.yan.dao.StudentDao;
import com.xv.yan.dao.impl.StudentDaoImpl;
import com.xv.yan.service.StudentService;

//作为StudentService的实现类
public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao=new StudentDaoImpl();
    @Override
    public boolean addStudent(StudentDo studentDo) {
        return studentDao.addStudent(studentDo)==1;
    }

    @Override
    public TableResult<StudentVo> queryStudentByPage(StudentRequest studentRequest) {
        return studentDao.queryStudentByPage(studentRequest);
    }
}
